<input type="text" id="ids" name="ids" value="{$ids}" required placeholder="请输入流程代码"
       autocomplete="off"
       class="layui-input">
<div class="layui-container">
    <div class="layui-row layui-col-space10">
        <div class="layui-col-md3">
            <div class="grid-demo">
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend>常用变量/函数</legend>
                </fieldset>
                <div id="test1" class="demo-tree demo-tree-box"></div>
            </div>
        </div>
        <div class="layui-col-md9">
            <div class="grid-demo grid-demo-bg1">
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend>信息</legend>
                </fieldset>
                <div class="layui-form-item">
                    <label class="layui-form-label">文本信息</label>
                    <div class="layui-input-block">
                        <input type="text" id="lineLabel" name="lineLabel" required placeholder="请输入流程代码"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">sql表达式</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入内容" name="fieldlistText" id='fieldlistText' data-rule="" rows="5"
                                  data-tip="" class="layui-textarea"></textarea>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<script src="/static/admin/layui/layui.js"></script>
<script src="/static/admin/js/xm-select.js"></script>
<script>
    layui.config({
        base: '/static/admin/' //静态资源所在路径
    }).extend({
        index: 'lib/index', //主入口模块
        treeTable: '../admin/lib/extend/authtree'
    }).use(['index', 'form', 'tree', 'util'], function () {
        var $ = layui.$, form = layui.form, tree = layui.tree
            , layer = layui.layer
            , util = layui.util
        $.ajax({
            url: "{:url('design/line')}",
            type: 'post',
            dataType: 'json',
            data: {"ids": $('#ids').val()},
            success: function (res) {
                //常规用法
                tree.render({
                    elem: '#test1' //默认是点击节点可进行收缩
                    ,data: res
                });
            }
        });
        form.render();
    });
</script>